#include<iostream>
#include<string>
using namespace std;
const int N = 1e5 + 10, M = N * 26;
int tree[M][26], idx;
string s[N];
int n;
void insert(string s)
{
	int p = 0;
	for (int i = 0; i < s.size(); i++) {
		char c = s[i];
		if (!tree[p][c]) {
			tree[p][c] = ++idx;
		}
		p = tree[p][c];
	}
}
int main()
{
	while (cin >> s[n++]) {
		insert(s[n-1]);
	}
	cout << idx + 1 << endl;
	return 0;
}